﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using SWCInvoice.Model;
using GalaSoft.MvvmLight;

namespace SWCInvoice.ViewModel {
    public class IdentifierViewModel : ViewModelBase {

        #region Fields

        /// <summary>
        /// The list of identifiers
        /// </summary>
        ObservableCollection<Identifier> _identifiers;

        /// <summary>
        /// Current identifier
        /// </summary>
        Identifier _currentIdentifier;
        #endregion

        #region Properties

        /// <summary>
        /// The list of the identifiers
        /// </summary>
        public ObservableCollection<Identifier> Identifiers {
            get {
                return _identifiers == null ? _identifiers = new ObservableCollection<Identifier>() : _identifiers;
            }
            set {
                if (_identifiers == value)
                    return;
                _identifiers = value;
                RaisePropertyChanged("Identifiers");
            }
        }

        /// <summary>
        /// Gets or sets current identifier
        /// </summary>
        public Identifier CurrentIdentifier {
            get { return _currentIdentifier; }
            set {
                if (_currentIdentifier == value) return;
                _currentIdentifier = value;
                RaisePropertyChanged("CurrentIdentifier");
            }
        }

        #endregion


    }
}
